package com.cn.mapper.dao.db5.PartsManagement;

import com.cn.bean.vo.PartsManagement.EquipmentBasicInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EquipmentBasicInfoDao {
    List<EquipmentBasicInfo> selectEquipmentBasicInfoAll();

    List<EquipmentBasicInfo> selectEquipmentBasicInfo(@Param("limit") int limit, @Param("page") int page, @Param("equipmentCode") String equipmentCode, @Param("equipmentName") String equipmentName);

    int addEquipmentBasicInfo(@Param("ID") int ID, @Param("equipmentCode") String equipmentCode, @Param("equipmentName") String equipmentName, @Param("responsiblePerson") int responsiblePerson, @Param("custodian") int custodian, @Param("user") int user, @Param("specificationModel") String specificationModel,
                              @Param("supplier") String supplier, @Param("description") String description, @Param("storageLocation") String storageLocation, @Param("equipmentStatus") int equipmentStatus,@Param("equipmentType") int equipmentType,@Param("procedures") Integer procedures);


    int deleteEquipmentBasicInfo(@Param("ID")int ID);
    int upDateEquipmentBasicInfo(@Param("ID") int ID, @Param("equipmentName") String equipmentName, @Param("responsiblePerson") int responsiblePerson, @Param("custodian") int custodian, @Param("user") int user, @Param("specificationModel") String specificationModel,
    @Param("supplier") String supplier, @Param("description") String description, @Param("storageLocation") String storageLocation, @Param("equipmentStatus") int equipmentStatus,@Param("equipmentType") int equipmentType,@Param("procedures") Integer procedures);
    int addEquipmentMechanicalStructureMapping(@Param("ID")int ID,@Param("equipmentID")int equipmentID,@Param("mechanicalStructureID")int mechanicalStructureID);


    int deleteEquipmentMechanicalStructureMapping(@Param("id")int id);
   //
   List<EquipmentBasicInfo> selectEquipmentBasicInfoAuto1(@Param("limit") int limit, @Param("page") int page, @Param("equipmentCode") String equipmentCode, @Param("equipmentName") String equipmentName);

   //判断设备结构是否被引用了
    Integer selectEq(@Param("id")int id);
}
